use shq_common::prelude::{dept::DeptmentCache, Deptment};
use anyhow::{Context, Result}; // 确保 Result 这里是 anyhow::Result


pub async fn get_deptment_list() -> Result<Vec<Deptment>> {
    let mut dept_cache = DeptmentCache::new()
        .with_context(|| "部门缓存失败")?;
    let raw_departments = dept_cache.get_all_dept().await?;
    Ok(raw_departments)
}
